ProductTradingStatus
This table contains live trading status records for entire product groups (futures and options) and asset groups and individual instruments
METADATA
Attribute | Value |
---|---|
Topic | 4440-product-status |
MLink Token | ClientLive |
Product | SRLive |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ccode_at | enum - AssetType | PRI | 'None' | product group |
ccode_ts | enum - TickerSrc | PRI | 'None' | product group |
ccode_tk | VARCHAR(12) | PRI | '' | product group |
assetCode | VARCHAR(6) | PRI | '' | asset code if this status update applies to a specific asset group Can be empty |
securityID | BIGINT | PRI | 0 | product ID if this status update applies to a specific instrument Can be 0 |
tradeDate | DATE | '1900-01-01' | ||
marketStatus | enum - MarketStatus | 'None' | market status open halted etc | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | time of last state update CST |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ccode_tk | 1 |
ccode_at | 2 |
ccode_ts | 3 |
assetCode | 4 |
securityID | 5 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRLive`.`MsgProductTradingStatus` (
`ccode_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'product group',
`ccode_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'product group',
`ccode_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'product group',
`assetCode` VARCHAR(6) NOT NULL DEFAULT '' COMMENT 'asset code if this status update applies to a specific asset group (Can be empty)',
`securityID` BIGINT NOT NULL DEFAULT 0 COMMENT 'product ID if this status update applies to a specific instrument (Can be 0)',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`marketStatus` ENUM('None','PreOpen','PreCross','Cross','Open','Closed','Halted','AfterHours') NOT NULL DEFAULT 'None' COMMENT 'market status (open, halted, etc)',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'time of last state update (CST)',
PRIMARY KEY USING HASH (`ccode_tk`,`ccode_at`,`ccode_ts`,`assetCode`,`securityID`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains live trading status records for entire product groups (futures and options) and asset groups and individual instruments';
SELECT TABLE EXAMPLE QUERY
SELECT
`ccode_at`,
`ccode_ts`,
`ccode_tk`,
`assetCode`,
`securityID`,
`tradeDate`,
`marketStatus`,
`timestamp`
FROM `SRLive`.`MsgProductTradingStatus`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ccode_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ccode_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ccode_tk` = 'Example_ccode_tk'
AND
/* Replace with a VARCHAR(6) */
`assetCode` = 'Example_assetCode'
AND
/* Replace with a BIGINT */
`securityID` = 1234567890;
Doc Columns Query
SELECT * FROM SRLive.doccolumns WHERE TABLE_NAME='ProductTradingStatus' ORDER BY ordinal_position ASC;